package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlUserMapper;
import com.ruoyi.hotel.domain.HlUser;
import com.ruoyi.hotel.service.IHlUserService;

/**
 * 用户列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlUserServiceImpl implements IHlUserService 
{
    @Autowired
    private HlUserMapper hlUserMapper;

    /**
     * 查询用户列表
     * 
     * @param id 用户列表主键
     * @return 用户列表
     */
    @Override
    public HlUser selectHlUserById(Long id)
    {
        return hlUserMapper.selectHlUserById(id);
    }

    /**
     * 查询用户列表列表
     * 
     * @param hlUser 用户列表
     * @return 用户列表
     */
    @Override
    public List<HlUser> selectHlUserList(HlUser hlUser)
    {
        return hlUserMapper.selectHlUserList(hlUser);
    }

    /**
     * 新增用户列表
     * 
     * @param hlUser 用户列表
     * @return 结果
     */
    @Override
    public int insertHlUser(HlUser hlUser)
    {

        return hlUserMapper.insertHlUser(hlUser);
    }

    /**
     * 修改用户列表
     * 
     * @param hlUser 用户列表
     * @return 结果
     */
    @Override
    public int updateHlUser(HlUser hlUser)
    {
        hlUser.setUpdateTime(DateUtils.getNowDate());
        return hlUserMapper.updateHlUser(hlUser);
    }

    /**
     * 批量删除用户列表
     * 
     * @param ids 需要删除的用户列表主键
     * @return 结果
     */
    @Override
    public int deleteHlUserByIds(Long[] ids)
    {
        return hlUserMapper.deleteHlUserByIds(ids);
    }

    /**
     * 删除用户列表信息
     * 
     * @param id 用户列表主键
     * @return 结果
     */
    @Override
    public int deleteHlUserById(Long id)
    {
        return hlUserMapper.deleteHlUserById(id);
    }

    /**
     * 查询用户列表信息根据手机号
     *
     * @param phone 用户主键
     * @return 结果
     */
    @Override
    public List<HlUser> selectHlUserListByPhone(String phone) {
        return hlUserMapper.selectHlUserListByPhone(phone);
    }

}
